From 9cb7eaf62285ded62e060e83bc913411cdcca034 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Sun, 13 Apr 2008 20:45:59 +0000 Subject: [PATCH] parse: Add 'kmh' and 'mph' to possible units within distance items. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3180 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gpsbabel/parse.c b/gpsbabel/parse.c index ce107a1d3..e6ee8b44a 100644 --- a/gpsbabel/parse.c +++ b/gpsbabel/parse.c @@ -101,10 +101,12 @@ parse_speed(const char *str, double *val, const double scale, const char *module else if (case_ignore_strcmp(unit, "mps") == 0) ; else if (case_ignore_strcmp(unit, "kph") == 0) *val = KPH_TO_MPS(*val); else if (case_ignore_strcmp(unit, "km/h") == 0) *val = KPH_TO_MPS(*val); + else if (case_ignore_strcmp(unit, "kmh") == 0) *val = KPH_TO_MPS(*val); else if (case_ignore_strcmp(unit, "kt") == 0) *val = KNOTS_TO_MPS(*val); else if (case_ignore_strcmp(unit, "knot") == 0) *val = KNOTS_TO_MPS(*val); else if (case_ignore_strcmp(unit, "mph") == 0) *val = MPH_TO_MPS(*val); else if (case_ignore_strcmp(unit, "mi/h") == 0) *val = MPH_TO_MPS(*val); + else if (case_ignore_strcmp(unit, "mih") == 0) *val = MPH_TO_MPS(*val); else fatal("%s: Unsupported speed unit '%s' in item '%s'!\n", module, unit, str); -- 2.30.2